<?php
$this->breadcrumbs = array(
	'Mutationen' => array('open')
);
?>
<div style="width: 350px; float: left; margin-top: 10px;">
	<h3>Offene Adress&auml;nderungen</h3>
	<?php
	$this->widget('zii.widgets.grid.CGridView', array(
		'id' => 'attributeChangesGrid',
		'dataProvider' => $attributeChanges,
		'selectableRows' => 1,
		'selectionChanged' => 'function(id){ location.href = "' . $this->createUrl('member/mutation') . '/"+$.fn.yiiGridView.getSelection(id);}',
		'columns' => array(
			array(
				'name' => 'Kundennummer',
				'value' => 'CHtml::link($data->Kundennummer, Yii::app()->createUrl("member/mutation", array("id" => $data->Benutzernummer)))',
				'type' => 'raw',
			),
			array(
				'name' => 'creationDate',
				'value' => 'date("d.m.Y", strtotime($data->creationDate))',
			),
			array(
				'name' => 'member_name',
				'value' => '$data->memberdata->Vorname . " " . $data->memberdata->Name',
			),
			array(
				'name' => 'Benutzer',
				'value' => '$data->user->email',
			),
		),
	));
	?>
</div>
<div style="width: 350px; float: right; margin-top: 10px;">
	<h3>Offene Mitgliedschafts&auml;nderungen</h3>
	<?php
	$this->widget('zii.widgets.grid.CGridView', array(
		'id' => 'membershipChangesGrid',
		'dataProvider' => $membershipChanges,
		'selectableRows' => 1,
		'selectionChanged' => 'function(id){ location.href = "' . $this->createUrl('member/mutation') . '/"+$.fn.yiiGridView.getSelection(id);}',
		'columns' => array(
			array(
				'name' => 'Kundennummer',
				'value' => 'CHtml::link($data->Kundennummer, Yii::app()->createUrl("member/mutation", array("id" => $data->Benutzernummer)))',
				'type' => 'raw',
			),
			array(
				'name' => 'creationDate',
				'value' => 'date("d.m.Y", strtotime($data->creationDate))',
			),
			array(
				'name' => 'member_name',
				'value' => '$data->memberdata->Vorname . " " . $data->memberdata->Name',
			),
			array(
				'name' => 'Benutzer',
//				'value' => '$data->user->email',
				'value' => 'CHtml::link($data->user->email, Yii::app()->createUrl("user/{$data->userId}"))',
				'type' => 'raw',
			),
		),
	));
	?>
</div>
